package com.xiguanlezz.cn.auth;

import com.xiguanlezz.cn.common.Operation;
import com.xiguanlezz.cn.common.OperationResult;

/**
 * @Author：习惯了种种
 * @CreateDate：2024/10/16 22:50
 * @Description：
 */
public class AuthOperation extends Operation {

    private final String username;
    private final String password;

    public AuthOperation(String username, String password) {
        this.username = username;
        this.password = password;
    }

    @Override
    public OperationResult execute() {
        return "admin".equals(username)
                ? new AuthOperationResult(true)
                : new AuthOperationResult(false);
    }
}
